package cn.chy.com.springbootdemo2.base.annotation;

import cn.chy.com.springbootdemo2.base.validator.PhoneValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @Description: TODO
 * @author: 颜景琦
 * @date: 2021年10月22日 14:40
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD, ElementType.TYPE})
@Constraint(validatedBy = PhoneValidator.class)
public @interface PhonePutter {

    String message() default "请输入正确的手机号";

    String reg() default "";

    // springboot验证规则
    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

}
